package com.tanxi521.commandmanager.Listener;

import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.ItemStack;

public class DropListener implements Listener {

    public static final String DO_DROP_WITH_GUI = "DRACONICE";

//    @EventHandler
//    public void onDrop(PlayerDropItemEvent e){
//
//        Player player = e.getPlayer();
//        ItemStack droppedItem = e.getItemDrop().getItemStack();
//        String typeName = droppedItem.getType().name();
//
//        if (player.getOpenInventory().getType() == InventoryType.CHEST && typeName.startsWith(DO_DROP_WITH_GUI)) {
//            e.setCancelled(true);
//            player.sendMessage("欸黑");
//        }
//
//    }


}
